package com.ycy.pojo;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

public class Employee {


	private int id;
	@Pattern(regexp = "[\u4e00-\u9fa5]{2,4}" ,message = "姓名只能2-4个汉字")
	private String name;
	@NotNull
	@Size(min = 1, max = 8,message = "昵称不能超过八个字符")
	private String nickname;
	@NotNull
	@Pattern(regexp="^[a-zA-Z0-9_\u4e00-\u9fa5]+${1,10}",message="密码只能是1-10位由汉字、字母和下划线组成")
	private String password;
	private String jobNumber;
	private double salary;
	private String section;
	private String state;
	private String address;
	private String number;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getJobNumber() {
		return jobNumber;
	}
	public void setJobNumber(String jobNumber) {
		this.jobNumber = jobNumber;
	}
	public double getSalary() {
		return salary;
	}
	public void setSalary(double salary) {
		this.salary = salary;
	}
	public String getSection() {
		return section;
	}
	public void setSection(String section) {
		this.section = section;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getNumber() {
		return number;
	}
	public void setNumber(String number) {
		this.number = number;
	}
	@Override
	public String toString() {
		return "Employee [id=" + id + ", name=" + name + ", nickname=" + nickname + ", password=" + password
				+ ", jobNumber=" + jobNumber + ", salary=" + salary + ", section=" + section + ", state=" + state
				+ ", address=" + address + ", number=" + number + "]";
	}
	public Employee() {
		super();
	}
	
	
	}
